package com.woniuedu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.woniuedu.dto.CourseInfoDto;
import com.woniuedu.dto.CourseVideo;
import com.woniuedu.dto.FindCourseDto;
import com.woniuedu.entity.Comment;
import com.woniuedu.entity.Course;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * author: 承雍
 * Date: 2022/4/19 10:47
 * Description:课程数据访问
 */

public interface CourseDao extends BaseMapper<Course> {

    IPage<Course> findAllCourse(@Param("iPage") IPage<Course> iPage, @Param("findCourseDto") FindCourseDto findCourseDto);

    CourseInfoDto findCourseInfo(String id);

    List<CourseVideo> findCourseVideo(String id);

    IPage<Comment> findAllComment(@Param("iPage")IPage<Comment> page, @Param("commentCourseId") String commentCourseId);

}
